import request from '@/utils/request'

export function pageRequest(data) {
  return request({
    url: '/goods/page',
    method: 'post',
    data
  })
}

export function goodsSave(data) {
  return request({
    url: '/goods/save',
    method: 'post',
    data
  })
}

export function listByShopId(id) {
  return request({
    url: '/goods/listByShopId/'+id,
    method: 'get'
  })
}

export function removeGoodsById(id) {
  return request({
    url: '/goods/deleteById/'+id,
    method: 'delete',
  })
}


export function updateGoodsById(data) {
  return request({
    url: '/goods/update',
    method: 'post',
    data
  })
}
